{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import warnings\n",
    "warnings.filterwarnings('ignore')\n",
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# !pip install -U git+https://github.com/qubvel/efficientnet"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "__file__ = 'EfficientNet-B5-9.8.10-0123'\n",
    "__version__ = 'v11'\n",
    "fold = 1\n",
    "os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"0,1,2,3\"\n",
    "n_gpus = len(os.environ[\"CUDA_VISIBLE_DEVICES\"].split(','))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Using TensorFlow backend.\n"
     ]
    }
   ],
   "source": [
    "from keras.preprocessing.image import ImageDataGenerator\n",
    "from glob import glob\n",
    "import tensorflow as tf\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import matplotlib.pyplot as plt\n",
    "import keras\n",
    "from keras.applications.inception_v3 import InceptionV3\n",
    "from keras.applications.xception import Xception\n",
    "from keras.applications.resnet50 import ResNet50\n",
    "from keras_applications.resnext import ResNeXt50\n",
    "from keras.applications.nasnet import NASNetLarge\n",
    "from keras.applications.inception_resnet_v2 import InceptionResNetV2\n",
    "from keras.models import *\n",
    "from keras.layers import *\n",
    "from keras.optimizers import *\n",
    "from keras.callbacks import *\n",
    "import PIL\n",
    "import time\n",
    "import efficientnet.keras as efn "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "path_data = '../garbage_classify/train_data_v2/'\n",
    "batch_size = 16 * n_gpus\n",
    "img_size = 456\n",
    "img_width = img_size\n",
    "img_height = img_size\n",
    "random_seed = 201908"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f4ccc1a96a0>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEGCAYAAACevtWaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO29eZybZbn//76TyTIzmTWzdJlpp6V7KUspSEURKFtBBRRx+0oVj4gHPXD8iqKe81XPTz1H0aOiRxQFQY8Kyq6yFSzIDi2U7qWldLownTWzJDOT9f798TxPJjOTZJJMkieT3O/Xq69JnjyZuSadfJ4r133dn0tIKVEoFApFcWExOwCFQqFQZB8l7gqFQlGEKHFXKBSKIkSJu0KhUBQhStwVCoWiCCkzOwCAhoYG2dbWZnYYCoVCMaPYsmVLj5SyMd5jBSHubW1tbN682ewwFAqFYkYhhGhP9JgqyygUCkURMqW4CyGWCiG2xvwbFEJcL4SoF0JsFELs07/W6ecLIcTNQoj9QohtQojVuf81FAqFQhHLlOIupdwrpTxJSnkScAowDNwP3Ag8KaVcDDyp3wdYDyzW/10N3JKLwBUKhUKRmHRr7uuAN6WU7UKIS4Cz9ON3Ak8BXwEuAX4rNV+DF4UQtUKI2VLKjizFrFAoSoBgMMiRI0cYHR01OxTTcTqdtLS0YLPZUn5OuuL+EeCP+u3mGME+BjTrt+cCh2Oec0Q/Nk7chRBXo2X2zJs3L80wFApFsXPkyBGqqqpoa2tDCGF2OKYhpaS3t5cjR46wYMGClJ+X8oKqEMIOvB/4c5wfLoG0HMiklLdKKddIKdc0Nsbt5FEoFCXM6Ogobre7pIUdQAiB2+1O+xNMOt0y64FXpZSd+v1OIcRs/YfPBrr040eB1pjntejHFAqFIi1KXdgNMnkd0hH3jzJWkgF4CNig394APBhz/Eq9a+Z0YEDV2xWlwsBIkAe3qlxGYT4pibsQohI4D7gv5vB/AecJIfYB5+r3AR4GDgD7gV8B/5y1aBWKAucvr7/NdXdt5Wj/iNmhKLLAzTffzPLly/n4xz9udihpk9KCqpTSB7gnHOtF656ZeK4Ers1KdArFDGNwNAhAr9fP3Npyk6NRTJef//znPPHEE7S0tJgdStqoHaoKRRbxjoYA6PMFTI5EMV2uueYaDhw4wPr166mpqeGqq67irLPOYuHChdx8883R8y699FJOOeUUVq5cya233ho97nK5uOGGG1i5ciXnnnsuL7/8cvT5Dz30EADhcJgbbriBU089lRNOOIFf/vKXWYu/ILxlFIrpMjAcRCKprbCbGofXr4m7Z1iJezb51l92suvtwax+zxVzqvnG+1YmfPwXv/gFjz76KJs2beJnP/sZjz/+OJs2bWJoaIilS5fyuc99DpvNxu233059fT0jIyOceuqpfPCDH8TtduPz+TjnnHO46aabuOyyy/i3f/s3Nm7cyK5du9iwYQPvf//7ue2226ipqeGVV17B7/dzxhlncP7556fV8pgIJe6KouD//vl1guEId151mqlxGJm7xxc0NQ5F9rn44otxOBw4HA6ampro7OykpaWFm2++mfvvvx+Aw4cPs2/fPtxuN3a7nQsvvBCAVatW4XA4sNlsrFq1ioMHDwLw+OOPs23bNu655x4ABgYG2LdvnxJ3hcLgYK+PcMT8Ye8qc88NyTLsfOFwOKK3rVYroVCIp556iieeeIIXXniBiooKzjrrrGg/us1mi7YwWiyW6PMtFguhkPZ3IqXkpz/9KRdccEHW41U1d0VR0D3kp9frNzuMqLibXXOPRCRfv387uzuyW8pQjGdgYIC6ujoqKirYs2cPL774YlrPv+CCC7jlllsIBrVPem+88QY+ny8rsanMXTHj8YfCDIxob45AKIK9zLycpVAy964hP79/6RCzqp0sn11taizFzIUXXsgvfvELli9fztKlSzn99NPTev4//dM/cfDgQVavXo2UksbGRh544IGsxKbEXTHj6fWOCWmfL8CsGqdpsRRKt4zx8/tUeWhaG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9r2HpZTP6bf/F/gX4FHgeGCjfg2wojktKhQFhxJ3RSnzcTR/kFOklEEhxEHAqT820ZdDol0Mdkop1+YvRIUiM1RZRlHK1ABdurCfDcyPeWyeEMIQ8Y8BzwJ7gUbjuBDCJoRYmdeIFYoUUeKuKGV+D6wRQmwHrgT2xDy2F20gy26gDrhFHwV5OfA9IcTraG6A78xzzApFSihXSIVCoShCVOauUCgURYgSd4VCoShClLgrFApFEaLEXaFQKIoQJe4KhUJRhChxVygUiiJEibtCoVAUIf8/KXfFLi+G53IAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "labels_train_raw = pd.read_csv(f'../tmp/labels_train_{__version__}_fold{fold}.csv')\n",
    "labels_train_ext = pd.read_csv(f'../tmp/labels_ext.csv')\n",
    "\n",
    "labels_train = pd.concat([labels_train_raw,labels_train_ext])\n",
    "\n",
    "labels_valid = pd.read_csv(f'../tmp/labels_valid_{__version__}_fold{fold}.csv')\n",
    "n_classess = labels_train.label.unique().shape[0]\n",
    "labels_train.groupby(by='label').count().plot()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "labels_train.label = labels_train.label.apply(lambda x: f'{x:02d}')\n",
    "labels_valid.label = labels_valid.label.apply(lambda x: f'{x:02d}')\n",
    "# labels_train['label_bin'].values = keras.utils.np_utils.to_categorical(\n",
    "#     labels_train.label, n_classess)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "({0: 0.9989321608040201,\n",
       "  1: 1.001448362720403,\n",
       "  2: 1.0407722513089006,\n",
       "  3: 3.011931818181818,\n",
       "  4: 0.9203125,\n",
       "  5: 1.123093220338983,\n",
       "  6: 1.0517857142857143,\n",
       "  7: 1.1391833810888252,\n",
       "  8: 1.1013157894736842,\n",
       "  9: 0.9160714285714285,\n",
       "  10: 1.0090736040609136,\n",
       "  11: 0.6221830985915493,\n",
       "  12: 1.054575596816976,\n",
       "  13: 1.0380548302872064,\n",
       "  14: 1.0602,\n",
       "  15: 0.9245930232558139,\n",
       "  16: 0.9557091346153846,\n",
       "  17: 0.5872599704579025,\n",
       "  18: 1.0168158567774936,\n",
       "  19: 0.9289135514018692,\n",
       "  20: 1.670483193277311,\n",
       "  21: 0.5770319303338172,\n",
       "  22: 1.0517857142857143,\n",
       "  23: 1.1262747875354107,\n",
       "  24: 1.104375,\n",
       "  25: 0.5933955223880597,\n",
       "  26: 1.0774390243902439,\n",
       "  27: 0.8334905660377359,\n",
       "  28: 0.9840965346534654,\n",
       "  29: 1.0039772727272727,\n",
       "  30: 1.2347049689440994,\n",
       "  31: 1.0602,\n",
       "  32: 1.2047727272727273,\n",
       "  33: 1.2866504854368932,\n",
       "  34: 0.9077054794520548,\n",
       "  35: 1.043503937007874,\n",
       "  36: 1.8932142857142857,\n",
       "  37: 1.2621428571428572,\n",
       "  38: 1.0952479338842975,\n",
       "  39: 0.9964285714285714},\n",
       " <matplotlib.axes._subplots.AxesSubplot at 0x7f4dbcd90828>)"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEGCAYAAACevtWaAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAATM0lEQVR4nO3df4xl5X3f8ffHu8uPyoWNYZKsGOx1itO0ILPBtwjbjZUsRcIYgSNv1FUdGTc4K8W1oI4qY9TIClVTiUQxjq0UdwO2N7FbQ3ETE4Qb0YDrYDlsZ2HB0DVk42IBodkx5odpbRzg2z/uM/WwmR93dmf23n32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text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "from sklearn.utils.class_weight import compute_class_weight\n",
    "class_weights = compute_class_weight('balanced', np.unique(labels_train.label), labels_train.label)\n",
    "d_class_weights = dict(enumerate(class_weights))\n",
    "d_class_weights,(labels_train.groupby(by='label').count()['fname'] * class_weights).plot()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Found 15903 validated image filenames belonging to 40 classes.\n",
      "Found 2944 validated image filenames belonging to 40 classes.\n"
     ]
    }
   ],
   "source": [
    "ig = ImageDataGenerator(preprocessing_function=efn.preprocess_input,\n",
    "                        width_shift_range=0.05,\n",
    "                        height_shift_range=0.05,\n",
    "                        brightness_range=(0.8, 1.4),\n",
    "                        horizontal_flip=True,\n",
    "                        vertical_flip=True)\n",
    "\n",
    "params_g = dict(\n",
    "    batch_size=batch_size,\n",
    "    # directory=path_data,\n",
    "    # class_mode='other',\n",
    "    x_col='fname',\n",
    "    y_col='label',\n",
    "    target_size=(img_width, img_height),\n",
    "    interpolation='lanczos',\n",
    "    seed=random_seed)\n",
    "\n",
    "train_g = ig.flow_from_dataframe(labels_train, path_data, **params_g)\n",
    "valid_g = ig.flow_from_dataframe(labels_valid[:-(labels_valid.shape[0] % batch_size)], path_data, shuffle=False, **params_g)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Colocations handled automatically by placer.\n",
      "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/function.py:1007: calling Graph.create_op (from tensorflow.python.framework.ops) with compute_shapes is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Shapes are always computed; don't use the compute_shapes as it has no effect.\n",
      "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/keras/backend/tensorflow_backend.py:3445: calling dropout (from tensorflow.python.ops.nn_ops) with keep_prob is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use `rate` instead of `keep_prob`. Rate should be set to `rate = 1 - keep_prob`.\n"
     ]
    }
   ],
   "source": [
    "base_model = efn.EfficientNetB5(weights='imagenet', include_top=False, input_shape=(img_width, img_height, 3),pooling='avg')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0 input_1\n",
      "1 stem_conv\n",
      "2 stem_bn\n",
      "3 stem_activation\n",
      "4 block1a_dwconv\n",
      "5 block1a_bn\n",
      "6 block1a_activation\n",
      "7 block1a_se_squeeze\n",
      "8 block1a_se_reshape\n",
      "9 block1a_se_reduce\n",
      "10 block1a_se_expand\n",
      "11 block1a_se_excite\n",
      "12 block1a_project_conv\n",
      "13 block1a_project_bn\n",
      "14 block1b_dwconv\n",
      "15 block1b_bn\n",
      "16 block1b_activation\n",
      "17 block1b_se_squeeze\n",
      "18 block1b_se_reshape\n",
      "19 block1b_se_reduce\n",
      "20 block1b_se_expand\n",
      "21 block1b_se_excite\n",
      "22 block1b_project_conv\n",
      "23 block1b_project_bn\n",
      "24 block1b_drop\n",
      "25 block1b_add\n",
      "26 block1c_dwconv\n",
      "27 block1c_bn\n",
      "28 block1c_activation\n",
      "29 block1c_se_squeeze\n",
      "30 block1c_se_reshape\n",
      "31 block1c_se_reduce\n",
      "32 block1c_se_expand\n",
      "33 block1c_se_excite\n",
      "34 block1c_project_conv\n",
      "35 block1c_project_bn\n",
      "36 block1c_drop\n",
      "37 block1c_add\n",
      "38 block2a_expand_conv\n",
      "39 block2a_expand_bn\n",
      "40 block2a_expand_activation\n",
      "41 block2a_dwconv\n",
      "42 block2a_bn\n",
      "43 block2a_activation\n",
      "44 block2a_se_squeeze\n",
      "45 block2a_se_reshape\n",
      "46 block2a_se_reduce\n",
      "47 block2a_se_expand\n",
      "48 block2a_se_excite\n",
      "49 block2a_project_conv\n",
      "50 block2a_project_bn\n",
      "51 block2b_expand_conv\n",
      "52 block2b_expand_bn\n",
      "53 block2b_expand_activation\n",
      "54 block2b_dwconv\n",
      "55 block2b_bn\n",
      "56 block2b_activation\n",
      "57 block2b_se_squeeze\n",
      "58 block2b_se_reshape\n",
      "59 block2b_se_reduce\n",
      "60 block2b_se_expand\n",
      "61 block2b_se_excite\n",
      "62 block2b_project_conv\n",
      "63 block2b_project_bn\n",
      "64 block2b_drop\n",
      "65 block2b_add\n",
      "66 block2c_expand_conv\n",
      "67 block2c_expand_bn\n",
      "68 block2c_expand_activation\n",
      "69 block2c_dwconv\n",
      "70 block2c_bn\n",
      "71 block2c_activation\n",
      "72 block2c_se_squeeze\n",
      "73 block2c_se_reshape\n",
      "74 block2c_se_reduce\n",
      "75 block2c_se_expand\n",
      "76 block2c_se_excite\n",
      "77 block2c_project_conv\n",
      "78 block2c_project_bn\n",
      "79 block2c_drop\n",
      "80 block2c_add\n",
      "81 block2d_expand_conv\n",
      "82 block2d_expand_bn\n",
      "83 block2d_expand_activation\n",
      "84 block2d_dwconv\n",
      "85 block2d_bn\n",
      "86 block2d_activation\n",
      "87 block2d_se_squeeze\n",
      "88 block2d_se_reshape\n",
      "89 block2d_se_reduce\n",
      "90 block2d_se_expand\n",
      "91 block2d_se_excite\n",
      "92 block2d_project_conv\n",
      "93 block2d_project_bn\n",
      "94 block2d_drop\n",
      "95 block2d_add\n",
      "96 block2e_expand_conv\n",
      "97 block2e_expand_bn\n",
      "98 block2e_expand_activation\n",
      "99 block2e_dwconv\n",
      "100 block2e_bn\n",
      "101 block2e_activation\n",
      "102 block2e_se_squeeze\n",
      "103 block2e_se_reshape\n",
      "104 block2e_se_reduce\n",
      "105 block2e_se_expand\n",
      "106 block2e_se_excite\n",
      "107 block2e_project_conv\n",
      "108 block2e_project_bn\n",
      "109 block2e_drop\n",
      "110 block2e_add\n",
      "111 block3a_expand_conv\n",
      "112 block3a_expand_bn\n",
      "113 block3a_expand_activation\n",
      "114 block3a_dwconv\n",
      "115 block3a_bn\n",
      "116 block3a_activation\n",
      "117 block3a_se_squeeze\n",
      "118 block3a_se_reshape\n",
      "119 block3a_se_reduce\n",
      "120 block3a_se_expand\n",
      "121 block3a_se_excite\n",
      "122 block3a_project_conv\n",
      "123 block3a_project_bn\n",
      "124 block3b_expand_conv\n",
      "125 block3b_expand_bn\n",
      "126 block3b_expand_activation\n",
      "127 block3b_dwconv\n",
      "128 block3b_bn\n",
      "129 block3b_activation\n",
      "130 block3b_se_squeeze\n",
      "131 block3b_se_reshape\n",
      "132 block3b_se_reduce\n",
      "133 block3b_se_expand\n",
      "134 block3b_se_excite\n",
      "135 block3b_project_conv\n",
      "136 block3b_project_bn\n",
      "137 block3b_drop\n",
      "138 block3b_add\n",
      "139 block3c_expand_conv\n",
      "140 block3c_expand_bn\n",
      "141 block3c_expand_activation\n",
      "142 block3c_dwconv\n",
      "143 block3c_bn\n",
      "144 block3c_activation\n",
      "145 block3c_se_squeeze\n",
      "146 block3c_se_reshape\n",
      "147 block3c_se_reduce\n",
      "148 block3c_se_expand\n",
      "149 block3c_se_excite\n",
      "150 block3c_project_conv\n",
      "151 block3c_project_bn\n",
      "152 block3c_drop\n",
      "153 block3c_add\n",
      "154 block3d_expand_conv\n",
      "155 block3d_expand_bn\n",
      "156 block3d_expand_activation\n",
      "157 block3d_dwconv\n",
      "158 block3d_bn\n",
      "159 block3d_activation\n",
      "160 block3d_se_squeeze\n",
      "161 block3d_se_reshape\n",
      "162 block3d_se_reduce\n",
      "163 block3d_se_expand\n",
      "164 block3d_se_excite\n",
      "165 block3d_project_conv\n",
      "166 block3d_project_bn\n",
      "167 block3d_drop\n",
      "168 block3d_add\n",
      "169 block3e_expand_conv\n",
      "170 block3e_expand_bn\n",
      "171 block3e_expand_activation\n",
      "172 block3e_dwconv\n",
      "173 block3e_bn\n",
      "174 block3e_activation\n",
      "175 block3e_se_squeeze\n",
      "176 block3e_se_reshape\n",
      "177 block3e_se_reduce\n",
      "178 block3e_se_expand\n",
      "179 block3e_se_excite\n",
      "180 block3e_project_conv\n",
      "181 block3e_project_bn\n",
      "182 block3e_drop\n",
      "183 block3e_add\n",
      "184 block4a_expand_conv\n",
      "185 block4a_expand_bn\n",
      "186 block4a_expand_activation\n",
      "187 block4a_dwconv\n",
      "188 block4a_bn\n",
      "189 block4a_activation\n",
      "190 block4a_se_squeeze\n",
      "191 block4a_se_reshape\n",
      "192 block4a_se_reduce\n",
      "193 block4a_se_expand\n",
      "194 block4a_se_excite\n",
      "195 block4a_project_conv\n",
      "196 block4a_project_bn\n",
      "197 block4b_expand_conv\n",
      "198 block4b_expand_bn\n",
      "199 block4b_expand_activation\n",
      "200 block4b_dwconv\n",
      "201 block4b_bn\n",
      "202 block4b_activation\n",
      "203 block4b_se_squeeze\n",
      "204 block4b_se_reshape\n",
      "205 block4b_se_reduce\n",
      "206 block4b_se_expand\n",
      "207 block4b_se_excite\n",
      "208 block4b_project_conv\n",
      "209 block4b_project_bn\n",
      "210 block4b_drop\n",
      "211 block4b_add\n",
      "212 block4c_expand_conv\n",
      "213 block4c_expand_bn\n",
      "214 block4c_expand_activation\n",
      "215 block4c_dwconv\n",
      "216 block4c_bn\n",
      "217 block4c_activation\n",
      "218 block4c_se_squeeze\n",
      "219 block4c_se_reshape\n",
      "220 block4c_se_reduce\n",
      "221 block4c_se_expand\n",
      "222 block4c_se_excite\n",
      "223 block4c_project_conv\n",
      "224 block4c_project_bn\n",
      "225 block4c_drop\n",
      "226 block4c_add\n",
      "227 block4d_expand_conv\n",
      "228 block4d_expand_bn\n",
      "229 block4d_expand_activation\n",
      "230 block4d_dwconv\n",
      "231 block4d_bn\n",
      "232 block4d_activation\n",
      "233 block4d_se_squeeze\n",
      "234 block4d_se_reshape\n",
      "235 block4d_se_reduce\n",
      "236 block4d_se_expand\n",
      "237 block4d_se_excite\n",
      "238 block4d_project_conv\n",
      "239 block4d_project_bn\n",
      "240 block4d_drop\n",
      "241 block4d_add\n",
      "242 block4e_expand_conv\n",
      "243 block4e_expand_bn\n",
      "244 block4e_expand_activation\n",
      "245 block4e_dwconv\n",
      "246 block4e_bn\n",
      "247 block4e_activation\n",
      "248 block4e_se_squeeze\n",
      "249 block4e_se_reshape\n",
      "250 block4e_se_reduce\n",
      "251 block4e_se_expand\n",
      "252 block4e_se_excite\n",
      "253 block4e_project_conv\n",
      "254 block4e_project_bn\n",
      "255 block4e_drop\n",
      "256 block4e_add\n",
      "257 block4f_expand_conv\n",
      "258 block4f_expand_bn\n",
      "259 block4f_expand_activation\n",
      "260 block4f_dwconv\n",
      "261 block4f_bn\n",
      "262 block4f_activation\n",
      "263 block4f_se_squeeze\n",
      "264 block4f_se_reshape\n",
      "265 block4f_se_reduce\n",
      "266 block4f_se_expand\n",
      "267 block4f_se_excite\n",
      "268 block4f_project_conv\n",
      "269 block4f_project_bn\n",
      "270 block4f_drop\n",
      "271 block4f_add\n",
      "272 block4g_expand_conv\n",
      "273 block4g_expand_bn\n",
      "274 block4g_expand_activation\n",
      "275 block4g_dwconv\n",
      "276 block4g_bn\n",
      "277 block4g_activation\n",
      "278 block4g_se_squeeze\n",
      "279 block4g_se_reshape\n",
      "280 block4g_se_reduce\n",
      "281 block4g_se_expand\n",
      "282 block4g_se_excite\n",
      "283 block4g_project_conv\n",
      "284 block4g_project_bn\n",
      "285 block4g_drop\n",
      "286 block4g_add\n",
      "287 block5a_expand_conv\n",
      "288 block5a_expand_bn\n",
      "289 block5a_expand_activation\n",
      "290 block5a_dwconv\n",
      "291 block5a_bn\n",
      "292 block5a_activation\n",
      "293 block5a_se_squeeze\n",
      "294 block5a_se_reshape\n",
      "295 block5a_se_reduce\n",
      "296 block5a_se_expand\n",
      "297 block5a_se_excite\n",
      "298 block5a_project_conv\n",
      "299 block5a_project_bn\n",
      "300 block5b_expand_conv\n",
      "301 block5b_expand_bn\n",
      "302 block5b_expand_activation\n",
      "303 block5b_dwconv\n",
      "304 block5b_bn\n",
      "305 block5b_activation\n",
      "306 block5b_se_squeeze\n",
      "307 block5b_se_reshape\n",
      "308 block5b_se_reduce\n",
      "309 block5b_se_expand\n",
      "310 block5b_se_excite\n",
      "311 block5b_project_conv\n",
      "312 block5b_project_bn\n",
      "313 block5b_drop\n",
      "314 block5b_add\n",
      "315 block5c_expand_conv\n",
      "316 block5c_expand_bn\n",
      "317 block5c_expand_activation\n",
      "318 block5c_dwconv\n",
      "319 block5c_bn\n",
      "320 block5c_activation\n",
      "321 block5c_se_squeeze\n",
      "322 block5c_se_reshape\n",
      "323 block5c_se_reduce\n",
      "324 block5c_se_expand\n",
      "325 block5c_se_excite\n",
      "326 block5c_project_conv\n",
      "327 block5c_project_bn\n",
      "328 block5c_drop\n",
      "329 block5c_add\n",
      "330 block5d_expand_conv\n",
      "331 block5d_expand_bn\n",
      "332 block5d_expand_activation\n",
      "333 block5d_dwconv\n",
      "334 block5d_bn\n",
      "335 block5d_activation\n",
      "336 block5d_se_squeeze\n",
      "337 block5d_se_reshape\n",
      "338 block5d_se_reduce\n",
      "339 block5d_se_expand\n",
      "340 block5d_se_excite\n",
      "341 block5d_project_conv\n",
      "342 block5d_project_bn\n",
      "343 block5d_drop\n",
      "344 block5d_add\n",
      "345 block5e_expand_conv\n",
      "346 block5e_expand_bn\n",
      "347 block5e_expand_activation\n",
      "348 block5e_dwconv\n",
      "349 block5e_bn\n",
      "350 block5e_activation\n",
      "351 block5e_se_squeeze\n",
      "352 block5e_se_reshape\n",
      "353 block5e_se_reduce\n",
      "354 block5e_se_expand\n",
      "355 block5e_se_excite\n",
      "356 block5e_project_conv\n",
      "357 block5e_project_bn\n",
      "358 block5e_drop\n",
      "359 block5e_add\n",
      "360 block5f_expand_conv\n",
      "361 block5f_expand_bn\n",
      "362 block5f_expand_activation\n",
      "363 block5f_dwconv\n",
      "364 block5f_bn\n",
      "365 block5f_activation\n",
      "366 block5f_se_squeeze\n",
      "367 block5f_se_reshape\n",
      "368 block5f_se_reduce\n",
      "369 block5f_se_expand\n",
      "370 block5f_se_excite\n",
      "371 block5f_project_conv\n",
      "372 block5f_project_bn\n",
      "373 block5f_drop\n",
      "374 block5f_add\n",
      "375 block5g_expand_conv\n",
      "376 block5g_expand_bn\n",
      "377 block5g_expand_activation\n",
      "378 block5g_dwconv\n",
      "379 block5g_bn\n",
      "380 block5g_activation\n",
      "381 block5g_se_squeeze\n",
      "382 block5g_se_reshape\n",
      "383 block5g_se_reduce\n",
      "384 block5g_se_expand\n",
      "385 block5g_se_excite\n",
      "386 block5g_project_conv\n",
      "387 block5g_project_bn\n",
      "388 block5g_drop\n",
      "389 block5g_add\n",
      "390 block6a_expand_conv\n",
      "391 block6a_expand_bn\n",
      "392 block6a_expand_activation\n",
      "393 block6a_dwconv\n",
      "394 block6a_bn\n",
      "395 block6a_activation\n",
      "396 block6a_se_squeeze\n",
      "397 block6a_se_reshape\n",
      "398 block6a_se_reduce\n",
      "399 block6a_se_expand\n",
      "400 block6a_se_excite\n",
      "401 block6a_project_conv\n",
      "402 block6a_project_bn\n",
      "403 block6b_expand_conv\n",
      "404 block6b_expand_bn\n",
      "405 block6b_expand_activation\n",
      "406 block6b_dwconv\n",
      "407 block6b_bn\n",
      "408 block6b_activation\n",
      "409 block6b_se_squeeze\n",
      "410 block6b_se_reshape\n",
      "411 block6b_se_reduce\n",
      "412 block6b_se_expand\n",
      "413 block6b_se_excite\n",
      "414 block6b_project_conv\n",
      "415 block6b_project_bn\n",
      "416 block6b_drop\n",
      "417 block6b_add\n",
      "418 block6c_expand_conv\n",
      "419 block6c_expand_bn\n",
      "420 block6c_expand_activation\n",
      "421 block6c_dwconv\n",
      "422 block6c_bn\n",
      "423 block6c_activation\n",
      "424 block6c_se_squeeze\n",
      "425 block6c_se_reshape\n",
      "426 block6c_se_reduce\n",
      "427 block6c_se_expand\n",
      "428 block6c_se_excite\n",
      "429 block6c_project_conv\n",
      "430 block6c_project_bn\n",
      "431 block6c_drop\n",
      "432 block6c_add\n",
      "433 block6d_expand_conv\n",
      "434 block6d_expand_bn\n",
      "435 block6d_expand_activation\n",
      "436 block6d_dwconv\n",
      "437 block6d_bn\n",
      "438 block6d_activation\n",
      "439 block6d_se_squeeze\n",
      "440 block6d_se_reshape\n",
      "441 block6d_se_reduce\n",
      "442 block6d_se_expand\n",
      "443 block6d_se_excite\n",
      "444 block6d_project_conv\n",
      "445 block6d_project_bn\n",
      "446 block6d_drop\n",
      "447 block6d_add\n",
      "448 block6e_expand_conv\n",
      "449 block6e_expand_bn\n",
      "450 block6e_expand_activation\n",
      "451 block6e_dwconv\n",
      "452 block6e_bn\n",
      "453 block6e_activation\n",
      "454 block6e_se_squeeze\n",
      "455 block6e_se_reshape\n",
      "456 block6e_se_reduce\n",
      "457 block6e_se_expand\n",
      "458 block6e_se_excite\n",
      "459 block6e_project_conv\n",
      "460 block6e_project_bn\n",
      "461 block6e_drop\n",
      "462 block6e_add\n",
      "463 block6f_expand_conv\n",
      "464 block6f_expand_bn\n",
      "465 block6f_expand_activation\n",
      "466 block6f_dwconv\n",
      "467 block6f_bn\n",
      "468 block6f_activation\n",
      "469 block6f_se_squeeze\n",
      "470 block6f_se_reshape\n",
      "471 block6f_se_reduce\n",
      "472 block6f_se_expand\n",
      "473 block6f_se_excite\n",
      "474 block6f_project_conv\n",
      "475 block6f_project_bn\n",
      "476 block6f_drop\n",
      "477 block6f_add\n",
      "478 block6g_expand_conv\n",
      "479 block6g_expand_bn\n",
      "480 block6g_expand_activation\n",
      "481 block6g_dwconv\n",
      "482 block6g_bn\n",
      "483 block6g_activation\n",
      "484 block6g_se_squeeze\n",
      "485 block6g_se_reshape\n",
      "486 block6g_se_reduce\n",
      "487 block6g_se_expand\n",
      "488 block6g_se_excite\n",
      "489 block6g_project_conv\n",
      "490 block6g_project_bn\n",
      "491 block6g_drop\n",
      "492 block6g_add\n",
      "493 block6h_expand_conv\n",
      "494 block6h_expand_bn\n",
      "495 block6h_expand_activation\n",
      "496 block6h_dwconv\n",
      "497 block6h_bn\n",
      "498 block6h_activation\n",
      "499 block6h_se_squeeze\n",
      "500 block6h_se_reshape\n",
      "501 block6h_se_reduce\n",
      "502 block6h_se_expand\n",
      "503 block6h_se_excite\n",
      "504 block6h_project_conv\n",
      "505 block6h_project_bn\n",
      "506 block6h_drop\n",
      "507 block6h_add\n",
      "508 block6i_expand_conv\n",
      "509 block6i_expand_bn\n",
      "510 block6i_expand_activation\n",
      "511 block6i_dwconv\n",
      "512 block6i_bn\n",
      "513 block6i_activation\n",
      "514 block6i_se_squeeze\n",
      "515 block6i_se_reshape\n",
      "516 block6i_se_reduce\n",
      "517 block6i_se_expand\n",
      "518 block6i_se_excite\n",
      "519 block6i_project_conv\n",
      "520 block6i_project_bn\n",
      "521 block6i_drop\n",
      "522 block6i_add\n",
      "523 block7a_expand_conv\n",
      "524 block7a_expand_bn\n",
      "525 block7a_expand_activation\n",
      "526 block7a_dwconv\n",
      "527 block7a_bn\n",
      "528 block7a_activation\n",
      "529 block7a_se_squeeze\n",
      "530 block7a_se_reshape\n",
      "531 block7a_se_reduce\n",
      "532 block7a_se_expand\n",
      "533 block7a_se_excite\n",
      "534 block7a_project_conv\n",
      "535 block7a_project_bn\n",
      "536 block7b_expand_conv\n",
      "537 block7b_expand_bn\n",
      "538 block7b_expand_activation\n",
      "539 block7b_dwconv\n",
      "540 block7b_bn\n",
      "541 block7b_activation\n",
      "542 block7b_se_squeeze\n",
      "543 block7b_se_reshape\n",
      "544 block7b_se_reduce\n",
      "545 block7b_se_expand\n",
      "546 block7b_se_excite\n",
      "547 block7b_project_conv\n",
      "548 block7b_project_bn\n",
      "549 block7b_drop\n",
      "550 block7b_add\n",
      "551 block7c_expand_conv\n",
      "552 block7c_expand_bn\n",
      "553 block7c_expand_activation\n",
      "554 block7c_dwconv\n",
      "555 block7c_bn\n",
      "556 block7c_activation\n",
      "557 block7c_se_squeeze\n",
      "558 block7c_se_reshape\n",
      "559 block7c_se_reduce\n",
      "560 block7c_se_expand\n",
      "561 block7c_se_excite\n",
      "562 block7c_project_conv\n",
      "563 block7c_project_bn\n",
      "564 block7c_drop\n",
      "565 block7c_add\n",
      "566 top_conv\n",
      "567 top_bn\n",
      "568 top_activation\n",
      "569 avg_pool\n"
     ]
    }
   ],
   "source": [
    "for i, layer in enumerate(base_model.layers):\n",
    "    print(i, layer.name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "for layer in base_model.layers[:287]:\n",
    "    layer.trainable=False"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "__________________________________________________________________________________________________\n",
      "Layer (type)                    Output Shape         Param #     Connected to                     \n",
      "==================================================================================================\n",
      "input_1 (InputLayer)            (None, 456, 456, 3)  0                                            \n",
      "__________________________________________________________________________________________________\n",
      "stem_conv (Conv2D)              (None, 228, 228, 48) 1296        input_1[0][0]                    \n",
      "__________________________________________________________________________________________________\n",
      "stem_bn (BatchNormalization)    (None, 228, 228, 48) 192         stem_conv[0][0]                  \n",
      "__________________________________________________________________________________________________\n",
      "stem_activation (Activation)    (None, 228, 228, 48) 0           stem_bn[0][0]                    \n",
      "__________________________________________________________________________________________________\n",
      "block1a_dwconv (DepthwiseConv2D (None, 228, 228, 48) 432         stem_activation[0][0]            \n",
      "__________________________________________________________________________________________________\n",
      "block1a_bn (BatchNormalization) (None, 228, 228, 48) 192         block1a_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block1a_activation (Activation) (None, 228, 228, 48) 0           block1a_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block1a_se_squeeze (GlobalAvera (None, 48)           0           block1a_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1a_se_reshape (Reshape)    (None, 1, 1, 48)     0           block1a_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1a_se_reduce (Conv2D)      (None, 1, 1, 12)     588         block1a_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1a_se_expand (Conv2D)      (None, 1, 1, 48)     624         block1a_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block1a_se_excite (Multiply)    (None, 228, 228, 48) 0           block1a_activation[0][0]         \n",
      "                                                                 block1a_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block1a_project_conv (Conv2D)   (None, 228, 228, 24) 1152        block1a_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block1a_project_bn (BatchNormal (None, 228, 228, 24) 96          block1a_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block1b_dwconv (DepthwiseConv2D (None, 228, 228, 24) 216         block1a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1b_bn (BatchNormalization) (None, 228, 228, 24) 96          block1b_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block1b_activation (Activation) (None, 228, 228, 24) 0           block1b_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block1b_se_squeeze (GlobalAvera (None, 24)           0           block1b_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1b_se_reshape (Reshape)    (None, 1, 1, 24)     0           block1b_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1b_se_reduce (Conv2D)      (None, 1, 1, 6)      150         block1b_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1b_se_expand (Conv2D)      (None, 1, 1, 24)     168         block1b_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block1b_se_excite (Multiply)    (None, 228, 228, 24) 0           block1b_activation[0][0]         \n",
      "                                                                 block1b_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block1b_project_conv (Conv2D)   (None, 228, 228, 24) 576         block1b_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block1b_project_bn (BatchNormal (None, 228, 228, 24) 96          block1b_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block1b_drop (FixedDropout)     (None, 228, 228, 24) 0           block1b_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1b_add (Add)               (None, 228, 228, 24) 0           block1b_drop[0][0]               \n",
      "                                                                 block1a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1c_dwconv (DepthwiseConv2D (None, 228, 228, 24) 216         block1b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block1c_bn (BatchNormalization) (None, 228, 228, 24) 96          block1c_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block1c_activation (Activation) (None, 228, 228, 24) 0           block1c_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block1c_se_squeeze (GlobalAvera (None, 24)           0           block1c_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1c_se_reshape (Reshape)    (None, 1, 1, 24)     0           block1c_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1c_se_reduce (Conv2D)      (None, 1, 1, 6)      150         block1c_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1c_se_expand (Conv2D)      (None, 1, 1, 24)     168         block1c_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block1c_se_excite (Multiply)    (None, 228, 228, 24) 0           block1c_activation[0][0]         \n",
      "                                                                 block1c_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block1c_project_conv (Conv2D)   (None, 228, 228, 24) 576         block1c_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block1c_project_bn (BatchNormal (None, 228, 228, 24) 96          block1c_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block1c_drop (FixedDropout)     (None, 228, 228, 24) 0           block1c_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block1c_add (Add)               (None, 228, 228, 24) 0           block1c_drop[0][0]               \n",
      "                                                                 block1b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block2a_expand_conv (Conv2D)    (None, 228, 228, 144 3456        block1c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block2a_expand_bn (BatchNormali (None, 228, 228, 144 576         block2a_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block2a_expand_activation (Acti (None, 228, 228, 144 0           block2a_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2a_dwconv (DepthwiseConv2D (None, 114, 114, 144 1296        block2a_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block2a_bn (BatchNormalization) (None, 114, 114, 144 576         block2a_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block2a_activation (Activation) (None, 114, 114, 144 0           block2a_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block2a_se_squeeze (GlobalAvera (None, 144)          0           block2a_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2a_se_reshape (Reshape)    (None, 1, 1, 144)    0           block2a_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2a_se_reduce (Conv2D)      (None, 1, 1, 6)      870         block2a_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2a_se_expand (Conv2D)      (None, 1, 1, 144)    1008        block2a_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2a_se_excite (Multiply)    (None, 114, 114, 144 0           block2a_activation[0][0]         \n",
      "                                                                 block2a_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2a_project_conv (Conv2D)   (None, 114, 114, 40) 5760        block2a_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2a_project_bn (BatchNormal (None, 114, 114, 40) 160         block2a_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block2b_expand_conv (Conv2D)    (None, 114, 114, 240 9600        block2a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2b_expand_bn (BatchNormali (None, 114, 114, 240 960         block2b_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block2b_expand_activation (Acti (None, 114, 114, 240 0           block2b_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2b_dwconv (DepthwiseConv2D (None, 114, 114, 240 2160        block2b_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block2b_bn (BatchNormalization) (None, 114, 114, 240 960         block2b_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block2b_activation (Activation) (None, 114, 114, 240 0           block2b_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block2b_se_squeeze (GlobalAvera (None, 240)          0           block2b_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2b_se_reshape (Reshape)    (None, 1, 1, 240)    0           block2b_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2b_se_reduce (Conv2D)      (None, 1, 1, 10)     2410        block2b_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2b_se_expand (Conv2D)      (None, 1, 1, 240)    2640        block2b_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2b_se_excite (Multiply)    (None, 114, 114, 240 0           block2b_activation[0][0]         \n",
      "                                                                 block2b_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2b_project_conv (Conv2D)   (None, 114, 114, 40) 9600        block2b_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2b_project_bn (BatchNormal (None, 114, 114, 40) 160         block2b_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block2b_drop (FixedDropout)     (None, 114, 114, 40) 0           block2b_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2b_add (Add)               (None, 114, 114, 40) 0           block2b_drop[0][0]               \n",
      "                                                                 block2a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2c_expand_conv (Conv2D)    (None, 114, 114, 240 9600        block2b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block2c_expand_bn (BatchNormali (None, 114, 114, 240 960         block2c_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block2c_expand_activation (Acti (None, 114, 114, 240 0           block2c_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2c_dwconv (DepthwiseConv2D (None, 114, 114, 240 2160        block2c_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block2c_bn (BatchNormalization) (None, 114, 114, 240 960         block2c_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block2c_activation (Activation) (None, 114, 114, 240 0           block2c_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block2c_se_squeeze (GlobalAvera (None, 240)          0           block2c_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2c_se_reshape (Reshape)    (None, 1, 1, 240)    0           block2c_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2c_se_reduce (Conv2D)      (None, 1, 1, 10)     2410        block2c_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2c_se_expand (Conv2D)      (None, 1, 1, 240)    2640        block2c_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2c_se_excite (Multiply)    (None, 114, 114, 240 0           block2c_activation[0][0]         \n",
      "                                                                 block2c_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2c_project_conv (Conv2D)   (None, 114, 114, 40) 9600        block2c_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2c_project_bn (BatchNormal (None, 114, 114, 40) 160         block2c_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block2c_drop (FixedDropout)     (None, 114, 114, 40) 0           block2c_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2c_add (Add)               (None, 114, 114, 40) 0           block2c_drop[0][0]               \n",
      "                                                                 block2b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block2d_expand_conv (Conv2D)    (None, 114, 114, 240 9600        block2c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block2d_expand_bn (BatchNormali (None, 114, 114, 240 960         block2d_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block2d_expand_activation (Acti (None, 114, 114, 240 0           block2d_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2d_dwconv (DepthwiseConv2D (None, 114, 114, 240 2160        block2d_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block2d_bn (BatchNormalization) (None, 114, 114, 240 960         block2d_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block2d_activation (Activation) (None, 114, 114, 240 0           block2d_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block2d_se_squeeze (GlobalAvera (None, 240)          0           block2d_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2d_se_reshape (Reshape)    (None, 1, 1, 240)    0           block2d_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2d_se_reduce (Conv2D)      (None, 1, 1, 10)     2410        block2d_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2d_se_expand (Conv2D)      (None, 1, 1, 240)    2640        block2d_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2d_se_excite (Multiply)    (None, 114, 114, 240 0           block2d_activation[0][0]         \n",
      "                                                                 block2d_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2d_project_conv (Conv2D)   (None, 114, 114, 40) 9600        block2d_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2d_project_bn (BatchNormal (None, 114, 114, 40) 160         block2d_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block2d_drop (FixedDropout)     (None, 114, 114, 40) 0           block2d_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2d_add (Add)               (None, 114, 114, 40) 0           block2d_drop[0][0]               \n",
      "                                                                 block2c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block2e_expand_conv (Conv2D)    (None, 114, 114, 240 9600        block2d_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block2e_expand_bn (BatchNormali (None, 114, 114, 240 960         block2e_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block2e_expand_activation (Acti (None, 114, 114, 240 0           block2e_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2e_dwconv (DepthwiseConv2D (None, 114, 114, 240 2160        block2e_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block2e_bn (BatchNormalization) (None, 114, 114, 240 960         block2e_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block2e_activation (Activation) (None, 114, 114, 240 0           block2e_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block2e_se_squeeze (GlobalAvera (None, 240)          0           block2e_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2e_se_reshape (Reshape)    (None, 1, 1, 240)    0           block2e_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2e_se_reduce (Conv2D)      (None, 1, 1, 10)     2410        block2e_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2e_se_expand (Conv2D)      (None, 1, 1, 240)    2640        block2e_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2e_se_excite (Multiply)    (None, 114, 114, 240 0           block2e_activation[0][0]         \n",
      "                                                                 block2e_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2e_project_conv (Conv2D)   (None, 114, 114, 40) 9600        block2e_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block2e_project_bn (BatchNormal (None, 114, 114, 40) 160         block2e_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block2e_drop (FixedDropout)     (None, 114, 114, 40) 0           block2e_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block2e_add (Add)               (None, 114, 114, 40) 0           block2e_drop[0][0]               \n",
      "                                                                 block2d_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block3a_expand_conv (Conv2D)    (None, 114, 114, 240 9600        block2e_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block3a_expand_bn (BatchNormali (None, 114, 114, 240 960         block3a_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block3a_expand_activation (Acti (None, 114, 114, 240 0           block3a_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3a_dwconv (DepthwiseConv2D (None, 57, 57, 240)  6000        block3a_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block3a_bn (BatchNormalization) (None, 57, 57, 240)  960         block3a_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block3a_activation (Activation) (None, 57, 57, 240)  0           block3a_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block3a_se_squeeze (GlobalAvera (None, 240)          0           block3a_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3a_se_reshape (Reshape)    (None, 1, 1, 240)    0           block3a_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3a_se_reduce (Conv2D)      (None, 1, 1, 10)     2410        block3a_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3a_se_expand (Conv2D)      (None, 1, 1, 240)    2640        block3a_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3a_se_excite (Multiply)    (None, 57, 57, 240)  0           block3a_activation[0][0]         \n",
      "                                                                 block3a_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3a_project_conv (Conv2D)   (None, 57, 57, 64)   15360       block3a_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3a_project_bn (BatchNormal (None, 57, 57, 64)   256         block3a_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block3b_expand_conv (Conv2D)    (None, 57, 57, 384)  24576       block3a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3b_expand_bn (BatchNormali (None, 57, 57, 384)  1536        block3b_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block3b_expand_activation (Acti (None, 57, 57, 384)  0           block3b_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3b_dwconv (DepthwiseConv2D (None, 57, 57, 384)  9600        block3b_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block3b_bn (BatchNormalization) (None, 57, 57, 384)  1536        block3b_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block3b_activation (Activation) (None, 57, 57, 384)  0           block3b_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block3b_se_squeeze (GlobalAvera (None, 384)          0           block3b_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3b_se_reshape (Reshape)    (None, 1, 1, 384)    0           block3b_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3b_se_reduce (Conv2D)      (None, 1, 1, 16)     6160        block3b_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3b_se_expand (Conv2D)      (None, 1, 1, 384)    6528        block3b_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3b_se_excite (Multiply)    (None, 57, 57, 384)  0           block3b_activation[0][0]         \n",
      "                                                                 block3b_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3b_project_conv (Conv2D)   (None, 57, 57, 64)   24576       block3b_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3b_project_bn (BatchNormal (None, 57, 57, 64)   256         block3b_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block3b_drop (FixedDropout)     (None, 57, 57, 64)   0           block3b_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3b_add (Add)               (None, 57, 57, 64)   0           block3b_drop[0][0]               \n",
      "                                                                 block3a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3c_expand_conv (Conv2D)    (None, 57, 57, 384)  24576       block3b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block3c_expand_bn (BatchNormali (None, 57, 57, 384)  1536        block3c_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block3c_expand_activation (Acti (None, 57, 57, 384)  0           block3c_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3c_dwconv (DepthwiseConv2D (None, 57, 57, 384)  9600        block3c_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block3c_bn (BatchNormalization) (None, 57, 57, 384)  1536        block3c_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block3c_activation (Activation) (None, 57, 57, 384)  0           block3c_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block3c_se_squeeze (GlobalAvera (None, 384)          0           block3c_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3c_se_reshape (Reshape)    (None, 1, 1, 384)    0           block3c_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3c_se_reduce (Conv2D)      (None, 1, 1, 16)     6160        block3c_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3c_se_expand (Conv2D)      (None, 1, 1, 384)    6528        block3c_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3c_se_excite (Multiply)    (None, 57, 57, 384)  0           block3c_activation[0][0]         \n",
      "                                                                 block3c_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3c_project_conv (Conv2D)   (None, 57, 57, 64)   24576       block3c_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3c_project_bn (BatchNormal (None, 57, 57, 64)   256         block3c_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block3c_drop (FixedDropout)     (None, 57, 57, 64)   0           block3c_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3c_add (Add)               (None, 57, 57, 64)   0           block3c_drop[0][0]               \n",
      "                                                                 block3b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block3d_expand_conv (Conv2D)    (None, 57, 57, 384)  24576       block3c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block3d_expand_bn (BatchNormali (None, 57, 57, 384)  1536        block3d_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block3d_expand_activation (Acti (None, 57, 57, 384)  0           block3d_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3d_dwconv (DepthwiseConv2D (None, 57, 57, 384)  9600        block3d_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block3d_bn (BatchNormalization) (None, 57, 57, 384)  1536        block3d_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block3d_activation (Activation) (None, 57, 57, 384)  0           block3d_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block3d_se_squeeze (GlobalAvera (None, 384)          0           block3d_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3d_se_reshape (Reshape)    (None, 1, 1, 384)    0           block3d_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3d_se_reduce (Conv2D)      (None, 1, 1, 16)     6160        block3d_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3d_se_expand (Conv2D)      (None, 1, 1, 384)    6528        block3d_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3d_se_excite (Multiply)    (None, 57, 57, 384)  0           block3d_activation[0][0]         \n",
      "                                                                 block3d_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3d_project_conv (Conv2D)   (None, 57, 57, 64)   24576       block3d_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3d_project_bn (BatchNormal (None, 57, 57, 64)   256         block3d_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block3d_drop (FixedDropout)     (None, 57, 57, 64)   0           block3d_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3d_add (Add)               (None, 57, 57, 64)   0           block3d_drop[0][0]               \n",
      "                                                                 block3c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block3e_expand_conv (Conv2D)    (None, 57, 57, 384)  24576       block3d_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block3e_expand_bn (BatchNormali (None, 57, 57, 384)  1536        block3e_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block3e_expand_activation (Acti (None, 57, 57, 384)  0           block3e_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3e_dwconv (DepthwiseConv2D (None, 57, 57, 384)  9600        block3e_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block3e_bn (BatchNormalization) (None, 57, 57, 384)  1536        block3e_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block3e_activation (Activation) (None, 57, 57, 384)  0           block3e_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block3e_se_squeeze (GlobalAvera (None, 384)          0           block3e_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3e_se_reshape (Reshape)    (None, 1, 1, 384)    0           block3e_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3e_se_reduce (Conv2D)      (None, 1, 1, 16)     6160        block3e_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3e_se_expand (Conv2D)      (None, 1, 1, 384)    6528        block3e_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3e_se_excite (Multiply)    (None, 57, 57, 384)  0           block3e_activation[0][0]         \n",
      "                                                                 block3e_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3e_project_conv (Conv2D)   (None, 57, 57, 64)   24576       block3e_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block3e_project_bn (BatchNormal (None, 57, 57, 64)   256         block3e_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block3e_drop (FixedDropout)     (None, 57, 57, 64)   0           block3e_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block3e_add (Add)               (None, 57, 57, 64)   0           block3e_drop[0][0]               \n",
      "                                                                 block3d_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4a_expand_conv (Conv2D)    (None, 57, 57, 384)  24576       block3e_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4a_expand_bn (BatchNormali (None, 57, 57, 384)  1536        block4a_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block4a_expand_activation (Acti (None, 57, 57, 384)  0           block4a_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4a_dwconv (DepthwiseConv2D (None, 29, 29, 384)  3456        block4a_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block4a_bn (BatchNormalization) (None, 29, 29, 384)  1536        block4a_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block4a_activation (Activation) (None, 29, 29, 384)  0           block4a_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block4a_se_squeeze (GlobalAvera (None, 384)          0           block4a_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4a_se_reshape (Reshape)    (None, 1, 1, 384)    0           block4a_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4a_se_reduce (Conv2D)      (None, 1, 1, 16)     6160        block4a_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4a_se_expand (Conv2D)      (None, 1, 1, 384)    6528        block4a_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4a_se_excite (Multiply)    (None, 29, 29, 384)  0           block4a_activation[0][0]         \n",
      "                                                                 block4a_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4a_project_conv (Conv2D)   (None, 29, 29, 128)  49152       block4a_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4a_project_bn (BatchNormal (None, 29, 29, 128)  512         block4a_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block4b_expand_conv (Conv2D)    (None, 29, 29, 768)  98304       block4a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4b_expand_bn (BatchNormali (None, 29, 29, 768)  3072        block4b_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block4b_expand_activation (Acti (None, 29, 29, 768)  0           block4b_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4b_dwconv (DepthwiseConv2D (None, 29, 29, 768)  6912        block4b_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block4b_bn (BatchNormalization) (None, 29, 29, 768)  3072        block4b_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block4b_activation (Activation) (None, 29, 29, 768)  0           block4b_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block4b_se_squeeze (GlobalAvera (None, 768)          0           block4b_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4b_se_reshape (Reshape)    (None, 1, 1, 768)    0           block4b_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4b_se_reduce (Conv2D)      (None, 1, 1, 32)     24608       block4b_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4b_se_expand (Conv2D)      (None, 1, 1, 768)    25344       block4b_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4b_se_excite (Multiply)    (None, 29, 29, 768)  0           block4b_activation[0][0]         \n",
      "                                                                 block4b_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4b_project_conv (Conv2D)   (None, 29, 29, 128)  98304       block4b_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4b_project_bn (BatchNormal (None, 29, 29, 128)  512         block4b_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block4b_drop (FixedDropout)     (None, 29, 29, 128)  0           block4b_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4b_add (Add)               (None, 29, 29, 128)  0           block4b_drop[0][0]               \n",
      "                                                                 block4a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4c_expand_conv (Conv2D)    (None, 29, 29, 768)  98304       block4b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4c_expand_bn (BatchNormali (None, 29, 29, 768)  3072        block4c_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block4c_expand_activation (Acti (None, 29, 29, 768)  0           block4c_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4c_dwconv (DepthwiseConv2D (None, 29, 29, 768)  6912        block4c_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block4c_bn (BatchNormalization) (None, 29, 29, 768)  3072        block4c_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block4c_activation (Activation) (None, 29, 29, 768)  0           block4c_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block4c_se_squeeze (GlobalAvera (None, 768)          0           block4c_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4c_se_reshape (Reshape)    (None, 1, 1, 768)    0           block4c_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4c_se_reduce (Conv2D)      (None, 1, 1, 32)     24608       block4c_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4c_se_expand (Conv2D)      (None, 1, 1, 768)    25344       block4c_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4c_se_excite (Multiply)    (None, 29, 29, 768)  0           block4c_activation[0][0]         \n",
      "                                                                 block4c_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4c_project_conv (Conv2D)   (None, 29, 29, 128)  98304       block4c_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4c_project_bn (BatchNormal (None, 29, 29, 128)  512         block4c_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block4c_drop (FixedDropout)     (None, 29, 29, 128)  0           block4c_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4c_add (Add)               (None, 29, 29, 128)  0           block4c_drop[0][0]               \n",
      "                                                                 block4b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4d_expand_conv (Conv2D)    (None, 29, 29, 768)  98304       block4c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4d_expand_bn (BatchNormali (None, 29, 29, 768)  3072        block4d_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block4d_expand_activation (Acti (None, 29, 29, 768)  0           block4d_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4d_dwconv (DepthwiseConv2D (None, 29, 29, 768)  6912        block4d_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block4d_bn (BatchNormalization) (None, 29, 29, 768)  3072        block4d_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block4d_activation (Activation) (None, 29, 29, 768)  0           block4d_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block4d_se_squeeze (GlobalAvera (None, 768)          0           block4d_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4d_se_reshape (Reshape)    (None, 1, 1, 768)    0           block4d_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4d_se_reduce (Conv2D)      (None, 1, 1, 32)     24608       block4d_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4d_se_expand (Conv2D)      (None, 1, 1, 768)    25344       block4d_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4d_se_excite (Multiply)    (None, 29, 29, 768)  0           block4d_activation[0][0]         \n",
      "                                                                 block4d_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4d_project_conv (Conv2D)   (None, 29, 29, 128)  98304       block4d_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4d_project_bn (BatchNormal (None, 29, 29, 128)  512         block4d_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block4d_drop (FixedDropout)     (None, 29, 29, 128)  0           block4d_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4d_add (Add)               (None, 29, 29, 128)  0           block4d_drop[0][0]               \n",
      "                                                                 block4c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4e_expand_conv (Conv2D)    (None, 29, 29, 768)  98304       block4d_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4e_expand_bn (BatchNormali (None, 29, 29, 768)  3072        block4e_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block4e_expand_activation (Acti (None, 29, 29, 768)  0           block4e_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4e_dwconv (DepthwiseConv2D (None, 29, 29, 768)  6912        block4e_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block4e_bn (BatchNormalization) (None, 29, 29, 768)  3072        block4e_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block4e_activation (Activation) (None, 29, 29, 768)  0           block4e_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block4e_se_squeeze (GlobalAvera (None, 768)          0           block4e_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4e_se_reshape (Reshape)    (None, 1, 1, 768)    0           block4e_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4e_se_reduce (Conv2D)      (None, 1, 1, 32)     24608       block4e_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4e_se_expand (Conv2D)      (None, 1, 1, 768)    25344       block4e_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4e_se_excite (Multiply)    (None, 29, 29, 768)  0           block4e_activation[0][0]         \n",
      "                                                                 block4e_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4e_project_conv (Conv2D)   (None, 29, 29, 128)  98304       block4e_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4e_project_bn (BatchNormal (None, 29, 29, 128)  512         block4e_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block4e_drop (FixedDropout)     (None, 29, 29, 128)  0           block4e_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4e_add (Add)               (None, 29, 29, 128)  0           block4e_drop[0][0]               \n",
      "                                                                 block4d_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4f_expand_conv (Conv2D)    (None, 29, 29, 768)  98304       block4e_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4f_expand_bn (BatchNormali (None, 29, 29, 768)  3072        block4f_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block4f_expand_activation (Acti (None, 29, 29, 768)  0           block4f_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4f_dwconv (DepthwiseConv2D (None, 29, 29, 768)  6912        block4f_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block4f_bn (BatchNormalization) (None, 29, 29, 768)  3072        block4f_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block4f_activation (Activation) (None, 29, 29, 768)  0           block4f_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block4f_se_squeeze (GlobalAvera (None, 768)          0           block4f_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4f_se_reshape (Reshape)    (None, 1, 1, 768)    0           block4f_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4f_se_reduce (Conv2D)      (None, 1, 1, 32)     24608       block4f_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4f_se_expand (Conv2D)      (None, 1, 1, 768)    25344       block4f_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4f_se_excite (Multiply)    (None, 29, 29, 768)  0           block4f_activation[0][0]         \n",
      "                                                                 block4f_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4f_project_conv (Conv2D)   (None, 29, 29, 128)  98304       block4f_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4f_project_bn (BatchNormal (None, 29, 29, 128)  512         block4f_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block4f_drop (FixedDropout)     (None, 29, 29, 128)  0           block4f_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4f_add (Add)               (None, 29, 29, 128)  0           block4f_drop[0][0]               \n",
      "                                                                 block4e_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4g_expand_conv (Conv2D)    (None, 29, 29, 768)  98304       block4f_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block4g_expand_bn (BatchNormali (None, 29, 29, 768)  3072        block4g_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block4g_expand_activation (Acti (None, 29, 29, 768)  0           block4g_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4g_dwconv (DepthwiseConv2D (None, 29, 29, 768)  6912        block4g_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block4g_bn (BatchNormalization) (None, 29, 29, 768)  3072        block4g_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block4g_activation (Activation) (None, 29, 29, 768)  0           block4g_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block4g_se_squeeze (GlobalAvera (None, 768)          0           block4g_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4g_se_reshape (Reshape)    (None, 1, 1, 768)    0           block4g_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4g_se_reduce (Conv2D)      (None, 1, 1, 32)     24608       block4g_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4g_se_expand (Conv2D)      (None, 1, 1, 768)    25344       block4g_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4g_se_excite (Multiply)    (None, 29, 29, 768)  0           block4g_activation[0][0]         \n",
      "                                                                 block4g_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4g_project_conv (Conv2D)   (None, 29, 29, 128)  98304       block4g_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block4g_project_bn (BatchNormal (None, 29, 29, 128)  512         block4g_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block4g_drop (FixedDropout)     (None, 29, 29, 128)  0           block4g_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block4g_add (Add)               (None, 29, 29, 128)  0           block4g_drop[0][0]               \n",
      "                                                                 block4f_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5a_expand_conv (Conv2D)    (None, 29, 29, 768)  98304       block4g_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5a_expand_bn (BatchNormali (None, 29, 29, 768)  3072        block5a_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block5a_expand_activation (Acti (None, 29, 29, 768)  0           block5a_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5a_dwconv (DepthwiseConv2D (None, 29, 29, 768)  19200       block5a_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block5a_bn (BatchNormalization) (None, 29, 29, 768)  3072        block5a_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block5a_activation (Activation) (None, 29, 29, 768)  0           block5a_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block5a_se_squeeze (GlobalAvera (None, 768)          0           block5a_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5a_se_reshape (Reshape)    (None, 1, 1, 768)    0           block5a_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5a_se_reduce (Conv2D)      (None, 1, 1, 32)     24608       block5a_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5a_se_expand (Conv2D)      (None, 1, 1, 768)    25344       block5a_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5a_se_excite (Multiply)    (None, 29, 29, 768)  0           block5a_activation[0][0]         \n",
      "                                                                 block5a_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5a_project_conv (Conv2D)   (None, 29, 29, 176)  135168      block5a_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5a_project_bn (BatchNormal (None, 29, 29, 176)  704         block5a_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block5b_expand_conv (Conv2D)    (None, 29, 29, 1056) 185856      block5a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5b_expand_bn (BatchNormali (None, 29, 29, 1056) 4224        block5b_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block5b_expand_activation (Acti (None, 29, 29, 1056) 0           block5b_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5b_dwconv (DepthwiseConv2D (None, 29, 29, 1056) 26400       block5b_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block5b_bn (BatchNormalization) (None, 29, 29, 1056) 4224        block5b_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block5b_activation (Activation) (None, 29, 29, 1056) 0           block5b_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block5b_se_squeeze (GlobalAvera (None, 1056)         0           block5b_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5b_se_reshape (Reshape)    (None, 1, 1, 1056)   0           block5b_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5b_se_reduce (Conv2D)      (None, 1, 1, 44)     46508       block5b_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5b_se_expand (Conv2D)      (None, 1, 1, 1056)   47520       block5b_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5b_se_excite (Multiply)    (None, 29, 29, 1056) 0           block5b_activation[0][0]         \n",
      "                                                                 block5b_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5b_project_conv (Conv2D)   (None, 29, 29, 176)  185856      block5b_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5b_project_bn (BatchNormal (None, 29, 29, 176)  704         block5b_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block5b_drop (FixedDropout)     (None, 29, 29, 176)  0           block5b_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5b_add (Add)               (None, 29, 29, 176)  0           block5b_drop[0][0]               \n",
      "                                                                 block5a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5c_expand_conv (Conv2D)    (None, 29, 29, 1056) 185856      block5b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5c_expand_bn (BatchNormali (None, 29, 29, 1056) 4224        block5c_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block5c_expand_activation (Acti (None, 29, 29, 1056) 0           block5c_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5c_dwconv (DepthwiseConv2D (None, 29, 29, 1056) 26400       block5c_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block5c_bn (BatchNormalization) (None, 29, 29, 1056) 4224        block5c_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block5c_activation (Activation) (None, 29, 29, 1056) 0           block5c_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block5c_se_squeeze (GlobalAvera (None, 1056)         0           block5c_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5c_se_reshape (Reshape)    (None, 1, 1, 1056)   0           block5c_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5c_se_reduce (Conv2D)      (None, 1, 1, 44)     46508       block5c_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5c_se_expand (Conv2D)      (None, 1, 1, 1056)   47520       block5c_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5c_se_excite (Multiply)    (None, 29, 29, 1056) 0           block5c_activation[0][0]         \n",
      "                                                                 block5c_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5c_project_conv (Conv2D)   (None, 29, 29, 176)  185856      block5c_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5c_project_bn (BatchNormal (None, 29, 29, 176)  704         block5c_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block5c_drop (FixedDropout)     (None, 29, 29, 176)  0           block5c_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5c_add (Add)               (None, 29, 29, 176)  0           block5c_drop[0][0]               \n",
      "                                                                 block5b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5d_expand_conv (Conv2D)    (None, 29, 29, 1056) 185856      block5c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5d_expand_bn (BatchNormali (None, 29, 29, 1056) 4224        block5d_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block5d_expand_activation (Acti (None, 29, 29, 1056) 0           block5d_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5d_dwconv (DepthwiseConv2D (None, 29, 29, 1056) 26400       block5d_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block5d_bn (BatchNormalization) (None, 29, 29, 1056) 4224        block5d_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block5d_activation (Activation) (None, 29, 29, 1056) 0           block5d_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block5d_se_squeeze (GlobalAvera (None, 1056)         0           block5d_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5d_se_reshape (Reshape)    (None, 1, 1, 1056)   0           block5d_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5d_se_reduce (Conv2D)      (None, 1, 1, 44)     46508       block5d_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5d_se_expand (Conv2D)      (None, 1, 1, 1056)   47520       block5d_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5d_se_excite (Multiply)    (None, 29, 29, 1056) 0           block5d_activation[0][0]         \n",
      "                                                                 block5d_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5d_project_conv (Conv2D)   (None, 29, 29, 176)  185856      block5d_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5d_project_bn (BatchNormal (None, 29, 29, 176)  704         block5d_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block5d_drop (FixedDropout)     (None, 29, 29, 176)  0           block5d_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5d_add (Add)               (None, 29, 29, 176)  0           block5d_drop[0][0]               \n",
      "                                                                 block5c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5e_expand_conv (Conv2D)    (None, 29, 29, 1056) 185856      block5d_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5e_expand_bn (BatchNormali (None, 29, 29, 1056) 4224        block5e_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block5e_expand_activation (Acti (None, 29, 29, 1056) 0           block5e_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5e_dwconv (DepthwiseConv2D (None, 29, 29, 1056) 26400       block5e_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block5e_bn (BatchNormalization) (None, 29, 29, 1056) 4224        block5e_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block5e_activation (Activation) (None, 29, 29, 1056) 0           block5e_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block5e_se_squeeze (GlobalAvera (None, 1056)         0           block5e_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5e_se_reshape (Reshape)    (None, 1, 1, 1056)   0           block5e_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5e_se_reduce (Conv2D)      (None, 1, 1, 44)     46508       block5e_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5e_se_expand (Conv2D)      (None, 1, 1, 1056)   47520       block5e_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5e_se_excite (Multiply)    (None, 29, 29, 1056) 0           block5e_activation[0][0]         \n",
      "                                                                 block5e_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5e_project_conv (Conv2D)   (None, 29, 29, 176)  185856      block5e_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5e_project_bn (BatchNormal (None, 29, 29, 176)  704         block5e_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block5e_drop (FixedDropout)     (None, 29, 29, 176)  0           block5e_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5e_add (Add)               (None, 29, 29, 176)  0           block5e_drop[0][0]               \n",
      "                                                                 block5d_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5f_expand_conv (Conv2D)    (None, 29, 29, 1056) 185856      block5e_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5f_expand_bn (BatchNormali (None, 29, 29, 1056) 4224        block5f_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block5f_expand_activation (Acti (None, 29, 29, 1056) 0           block5f_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5f_dwconv (DepthwiseConv2D (None, 29, 29, 1056) 26400       block5f_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block5f_bn (BatchNormalization) (None, 29, 29, 1056) 4224        block5f_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block5f_activation (Activation) (None, 29, 29, 1056) 0           block5f_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block5f_se_squeeze (GlobalAvera (None, 1056)         0           block5f_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5f_se_reshape (Reshape)    (None, 1, 1, 1056)   0           block5f_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5f_se_reduce (Conv2D)      (None, 1, 1, 44)     46508       block5f_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5f_se_expand (Conv2D)      (None, 1, 1, 1056)   47520       block5f_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5f_se_excite (Multiply)    (None, 29, 29, 1056) 0           block5f_activation[0][0]         \n",
      "                                                                 block5f_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5f_project_conv (Conv2D)   (None, 29, 29, 176)  185856      block5f_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5f_project_bn (BatchNormal (None, 29, 29, 176)  704         block5f_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block5f_drop (FixedDropout)     (None, 29, 29, 176)  0           block5f_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5f_add (Add)               (None, 29, 29, 176)  0           block5f_drop[0][0]               \n",
      "                                                                 block5e_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5g_expand_conv (Conv2D)    (None, 29, 29, 1056) 185856      block5f_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block5g_expand_bn (BatchNormali (None, 29, 29, 1056) 4224        block5g_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block5g_expand_activation (Acti (None, 29, 29, 1056) 0           block5g_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5g_dwconv (DepthwiseConv2D (None, 29, 29, 1056) 26400       block5g_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block5g_bn (BatchNormalization) (None, 29, 29, 1056) 4224        block5g_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block5g_activation (Activation) (None, 29, 29, 1056) 0           block5g_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block5g_se_squeeze (GlobalAvera (None, 1056)         0           block5g_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5g_se_reshape (Reshape)    (None, 1, 1, 1056)   0           block5g_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5g_se_reduce (Conv2D)      (None, 1, 1, 44)     46508       block5g_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5g_se_expand (Conv2D)      (None, 1, 1, 1056)   47520       block5g_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5g_se_excite (Multiply)    (None, 29, 29, 1056) 0           block5g_activation[0][0]         \n",
      "                                                                 block5g_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5g_project_conv (Conv2D)   (None, 29, 29, 176)  185856      block5g_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block5g_project_bn (BatchNormal (None, 29, 29, 176)  704         block5g_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block5g_drop (FixedDropout)     (None, 29, 29, 176)  0           block5g_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block5g_add (Add)               (None, 29, 29, 176)  0           block5g_drop[0][0]               \n",
      "                                                                 block5f_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6a_expand_conv (Conv2D)    (None, 29, 29, 1056) 185856      block5g_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6a_expand_bn (BatchNormali (None, 29, 29, 1056) 4224        block6a_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block6a_expand_activation (Acti (None, 29, 29, 1056) 0           block6a_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6a_dwconv (DepthwiseConv2D (None, 15, 15, 1056) 26400       block6a_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block6a_bn (BatchNormalization) (None, 15, 15, 1056) 4224        block6a_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block6a_activation (Activation) (None, 15, 15, 1056) 0           block6a_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block6a_se_squeeze (GlobalAvera (None, 1056)         0           block6a_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6a_se_reshape (Reshape)    (None, 1, 1, 1056)   0           block6a_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6a_se_reduce (Conv2D)      (None, 1, 1, 44)     46508       block6a_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6a_se_expand (Conv2D)      (None, 1, 1, 1056)   47520       block6a_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6a_se_excite (Multiply)    (None, 15, 15, 1056) 0           block6a_activation[0][0]         \n",
      "                                                                 block6a_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6a_project_conv (Conv2D)   (None, 15, 15, 304)  321024      block6a_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6a_project_bn (BatchNormal (None, 15, 15, 304)  1216        block6a_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block6b_expand_conv (Conv2D)    (None, 15, 15, 1824) 554496      block6a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6b_expand_bn (BatchNormali (None, 15, 15, 1824) 7296        block6b_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block6b_expand_activation (Acti (None, 15, 15, 1824) 0           block6b_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6b_dwconv (DepthwiseConv2D (None, 15, 15, 1824) 45600       block6b_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block6b_bn (BatchNormalization) (None, 15, 15, 1824) 7296        block6b_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block6b_activation (Activation) (None, 15, 15, 1824) 0           block6b_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block6b_se_squeeze (GlobalAvera (None, 1824)         0           block6b_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6b_se_reshape (Reshape)    (None, 1, 1, 1824)   0           block6b_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6b_se_reduce (Conv2D)      (None, 1, 1, 76)     138700      block6b_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6b_se_expand (Conv2D)      (None, 1, 1, 1824)   140448      block6b_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6b_se_excite (Multiply)    (None, 15, 15, 1824) 0           block6b_activation[0][0]         \n",
      "                                                                 block6b_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6b_project_conv (Conv2D)   (None, 15, 15, 304)  554496      block6b_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6b_project_bn (BatchNormal (None, 15, 15, 304)  1216        block6b_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block6b_drop (FixedDropout)     (None, 15, 15, 304)  0           block6b_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6b_add (Add)               (None, 15, 15, 304)  0           block6b_drop[0][0]               \n",
      "                                                                 block6a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6c_expand_conv (Conv2D)    (None, 15, 15, 1824) 554496      block6b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6c_expand_bn (BatchNormali (None, 15, 15, 1824) 7296        block6c_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block6c_expand_activation (Acti (None, 15, 15, 1824) 0           block6c_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6c_dwconv (DepthwiseConv2D (None, 15, 15, 1824) 45600       block6c_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block6c_bn (BatchNormalization) (None, 15, 15, 1824) 7296        block6c_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block6c_activation (Activation) (None, 15, 15, 1824) 0           block6c_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block6c_se_squeeze (GlobalAvera (None, 1824)         0           block6c_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6c_se_reshape (Reshape)    (None, 1, 1, 1824)   0           block6c_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6c_se_reduce (Conv2D)      (None, 1, 1, 76)     138700      block6c_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6c_se_expand (Conv2D)      (None, 1, 1, 1824)   140448      block6c_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6c_se_excite (Multiply)    (None, 15, 15, 1824) 0           block6c_activation[0][0]         \n",
      "                                                                 block6c_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6c_project_conv (Conv2D)   (None, 15, 15, 304)  554496      block6c_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6c_project_bn (BatchNormal (None, 15, 15, 304)  1216        block6c_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block6c_drop (FixedDropout)     (None, 15, 15, 304)  0           block6c_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6c_add (Add)               (None, 15, 15, 304)  0           block6c_drop[0][0]               \n",
      "                                                                 block6b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6d_expand_conv (Conv2D)    (None, 15, 15, 1824) 554496      block6c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6d_expand_bn (BatchNormali (None, 15, 15, 1824) 7296        block6d_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block6d_expand_activation (Acti (None, 15, 15, 1824) 0           block6d_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6d_dwconv (DepthwiseConv2D (None, 15, 15, 1824) 45600       block6d_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block6d_bn (BatchNormalization) (None, 15, 15, 1824) 7296        block6d_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block6d_activation (Activation) (None, 15, 15, 1824) 0           block6d_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block6d_se_squeeze (GlobalAvera (None, 1824)         0           block6d_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6d_se_reshape (Reshape)    (None, 1, 1, 1824)   0           block6d_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6d_se_reduce (Conv2D)      (None, 1, 1, 76)     138700      block6d_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6d_se_expand (Conv2D)      (None, 1, 1, 1824)   140448      block6d_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6d_se_excite (Multiply)    (None, 15, 15, 1824) 0           block6d_activation[0][0]         \n",
      "                                                                 block6d_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6d_project_conv (Conv2D)   (None, 15, 15, 304)  554496      block6d_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6d_project_bn (BatchNormal (None, 15, 15, 304)  1216        block6d_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block6d_drop (FixedDropout)     (None, 15, 15, 304)  0           block6d_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6d_add (Add)               (None, 15, 15, 304)  0           block6d_drop[0][0]               \n",
      "                                                                 block6c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6e_expand_conv (Conv2D)    (None, 15, 15, 1824) 554496      block6d_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6e_expand_bn (BatchNormali (None, 15, 15, 1824) 7296        block6e_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block6e_expand_activation (Acti (None, 15, 15, 1824) 0           block6e_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6e_dwconv (DepthwiseConv2D (None, 15, 15, 1824) 45600       block6e_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block6e_bn (BatchNormalization) (None, 15, 15, 1824) 7296        block6e_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block6e_activation (Activation) (None, 15, 15, 1824) 0           block6e_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block6e_se_squeeze (GlobalAvera (None, 1824)         0           block6e_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6e_se_reshape (Reshape)    (None, 1, 1, 1824)   0           block6e_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6e_se_reduce (Conv2D)      (None, 1, 1, 76)     138700      block6e_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6e_se_expand (Conv2D)      (None, 1, 1, 1824)   140448      block6e_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6e_se_excite (Multiply)    (None, 15, 15, 1824) 0           block6e_activation[0][0]         \n",
      "                                                                 block6e_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6e_project_conv (Conv2D)   (None, 15, 15, 304)  554496      block6e_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6e_project_bn (BatchNormal (None, 15, 15, 304)  1216        block6e_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block6e_drop (FixedDropout)     (None, 15, 15, 304)  0           block6e_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6e_add (Add)               (None, 15, 15, 304)  0           block6e_drop[0][0]               \n",
      "                                                                 block6d_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6f_expand_conv (Conv2D)    (None, 15, 15, 1824) 554496      block6e_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6f_expand_bn (BatchNormali (None, 15, 15, 1824) 7296        block6f_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block6f_expand_activation (Acti (None, 15, 15, 1824) 0           block6f_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6f_dwconv (DepthwiseConv2D (None, 15, 15, 1824) 45600       block6f_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block6f_bn (BatchNormalization) (None, 15, 15, 1824) 7296        block6f_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block6f_activation (Activation) (None, 15, 15, 1824) 0           block6f_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block6f_se_squeeze (GlobalAvera (None, 1824)         0           block6f_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6f_se_reshape (Reshape)    (None, 1, 1, 1824)   0           block6f_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6f_se_reduce (Conv2D)      (None, 1, 1, 76)     138700      block6f_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6f_se_expand (Conv2D)      (None, 1, 1, 1824)   140448      block6f_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6f_se_excite (Multiply)    (None, 15, 15, 1824) 0           block6f_activation[0][0]         \n",
      "                                                                 block6f_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6f_project_conv (Conv2D)   (None, 15, 15, 304)  554496      block6f_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6f_project_bn (BatchNormal (None, 15, 15, 304)  1216        block6f_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block6f_drop (FixedDropout)     (None, 15, 15, 304)  0           block6f_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6f_add (Add)               (None, 15, 15, 304)  0           block6f_drop[0][0]               \n",
      "                                                                 block6e_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6g_expand_conv (Conv2D)    (None, 15, 15, 1824) 554496      block6f_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6g_expand_bn (BatchNormali (None, 15, 15, 1824) 7296        block6g_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block6g_expand_activation (Acti (None, 15, 15, 1824) 0           block6g_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6g_dwconv (DepthwiseConv2D (None, 15, 15, 1824) 45600       block6g_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block6g_bn (BatchNormalization) (None, 15, 15, 1824) 7296        block6g_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block6g_activation (Activation) (None, 15, 15, 1824) 0           block6g_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block6g_se_squeeze (GlobalAvera (None, 1824)         0           block6g_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6g_se_reshape (Reshape)    (None, 1, 1, 1824)   0           block6g_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6g_se_reduce (Conv2D)      (None, 1, 1, 76)     138700      block6g_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6g_se_expand (Conv2D)      (None, 1, 1, 1824)   140448      block6g_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6g_se_excite (Multiply)    (None, 15, 15, 1824) 0           block6g_activation[0][0]         \n",
      "                                                                 block6g_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6g_project_conv (Conv2D)   (None, 15, 15, 304)  554496      block6g_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6g_project_bn (BatchNormal (None, 15, 15, 304)  1216        block6g_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block6g_drop (FixedDropout)     (None, 15, 15, 304)  0           block6g_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6g_add (Add)               (None, 15, 15, 304)  0           block6g_drop[0][0]               \n",
      "                                                                 block6f_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6h_expand_conv (Conv2D)    (None, 15, 15, 1824) 554496      block6g_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6h_expand_bn (BatchNormali (None, 15, 15, 1824) 7296        block6h_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block6h_expand_activation (Acti (None, 15, 15, 1824) 0           block6h_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6h_dwconv (DepthwiseConv2D (None, 15, 15, 1824) 45600       block6h_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block6h_bn (BatchNormalization) (None, 15, 15, 1824) 7296        block6h_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block6h_activation (Activation) (None, 15, 15, 1824) 0           block6h_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block6h_se_squeeze (GlobalAvera (None, 1824)         0           block6h_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6h_se_reshape (Reshape)    (None, 1, 1, 1824)   0           block6h_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6h_se_reduce (Conv2D)      (None, 1, 1, 76)     138700      block6h_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6h_se_expand (Conv2D)      (None, 1, 1, 1824)   140448      block6h_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6h_se_excite (Multiply)    (None, 15, 15, 1824) 0           block6h_activation[0][0]         \n",
      "                                                                 block6h_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6h_project_conv (Conv2D)   (None, 15, 15, 304)  554496      block6h_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6h_project_bn (BatchNormal (None, 15, 15, 304)  1216        block6h_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block6h_drop (FixedDropout)     (None, 15, 15, 304)  0           block6h_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6h_add (Add)               (None, 15, 15, 304)  0           block6h_drop[0][0]               \n",
      "                                                                 block6g_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6i_expand_conv (Conv2D)    (None, 15, 15, 1824) 554496      block6h_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block6i_expand_bn (BatchNormali (None, 15, 15, 1824) 7296        block6i_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block6i_expand_activation (Acti (None, 15, 15, 1824) 0           block6i_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6i_dwconv (DepthwiseConv2D (None, 15, 15, 1824) 45600       block6i_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block6i_bn (BatchNormalization) (None, 15, 15, 1824) 7296        block6i_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block6i_activation (Activation) (None, 15, 15, 1824) 0           block6i_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block6i_se_squeeze (GlobalAvera (None, 1824)         0           block6i_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6i_se_reshape (Reshape)    (None, 1, 1, 1824)   0           block6i_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6i_se_reduce (Conv2D)      (None, 1, 1, 76)     138700      block6i_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6i_se_expand (Conv2D)      (None, 1, 1, 1824)   140448      block6i_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6i_se_excite (Multiply)    (None, 15, 15, 1824) 0           block6i_activation[0][0]         \n",
      "                                                                 block6i_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6i_project_conv (Conv2D)   (None, 15, 15, 304)  554496      block6i_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block6i_project_bn (BatchNormal (None, 15, 15, 304)  1216        block6i_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block6i_drop (FixedDropout)     (None, 15, 15, 304)  0           block6i_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block6i_add (Add)               (None, 15, 15, 304)  0           block6i_drop[0][0]               \n",
      "                                                                 block6h_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block7a_expand_conv (Conv2D)    (None, 15, 15, 1824) 554496      block6i_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block7a_expand_bn (BatchNormali (None, 15, 15, 1824) 7296        block7a_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block7a_expand_activation (Acti (None, 15, 15, 1824) 0           block7a_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7a_dwconv (DepthwiseConv2D (None, 15, 15, 1824) 16416       block7a_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block7a_bn (BatchNormalization) (None, 15, 15, 1824) 7296        block7a_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block7a_activation (Activation) (None, 15, 15, 1824) 0           block7a_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block7a_se_squeeze (GlobalAvera (None, 1824)         0           block7a_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7a_se_reshape (Reshape)    (None, 1, 1, 1824)   0           block7a_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7a_se_reduce (Conv2D)      (None, 1, 1, 76)     138700      block7a_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7a_se_expand (Conv2D)      (None, 1, 1, 1824)   140448      block7a_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7a_se_excite (Multiply)    (None, 15, 15, 1824) 0           block7a_activation[0][0]         \n",
      "                                                                 block7a_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7a_project_conv (Conv2D)   (None, 15, 15, 512)  933888      block7a_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7a_project_bn (BatchNormal (None, 15, 15, 512)  2048        block7a_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block7b_expand_conv (Conv2D)    (None, 15, 15, 3072) 1572864     block7a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7b_expand_bn (BatchNormali (None, 15, 15, 3072) 12288       block7b_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block7b_expand_activation (Acti (None, 15, 15, 3072) 0           block7b_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7b_dwconv (DepthwiseConv2D (None, 15, 15, 3072) 27648       block7b_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block7b_bn (BatchNormalization) (None, 15, 15, 3072) 12288       block7b_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block7b_activation (Activation) (None, 15, 15, 3072) 0           block7b_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block7b_se_squeeze (GlobalAvera (None, 3072)         0           block7b_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7b_se_reshape (Reshape)    (None, 1, 1, 3072)   0           block7b_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7b_se_reduce (Conv2D)      (None, 1, 1, 128)    393344      block7b_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7b_se_expand (Conv2D)      (None, 1, 1, 3072)   396288      block7b_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7b_se_excite (Multiply)    (None, 15, 15, 3072) 0           block7b_activation[0][0]         \n",
      "                                                                 block7b_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7b_project_conv (Conv2D)   (None, 15, 15, 512)  1572864     block7b_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7b_project_bn (BatchNormal (None, 15, 15, 512)  2048        block7b_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block7b_drop (FixedDropout)     (None, 15, 15, 512)  0           block7b_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7b_add (Add)               (None, 15, 15, 512)  0           block7b_drop[0][0]               \n",
      "                                                                 block7a_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7c_expand_conv (Conv2D)    (None, 15, 15, 3072) 1572864     block7b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "block7c_expand_bn (BatchNormali (None, 15, 15, 3072) 12288       block7c_expand_conv[0][0]        \n",
      "__________________________________________________________________________________________________\n",
      "block7c_expand_activation (Acti (None, 15, 15, 3072) 0           block7c_expand_bn[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7c_dwconv (DepthwiseConv2D (None, 15, 15, 3072) 27648       block7c_expand_activation[0][0]  \n",
      "__________________________________________________________________________________________________\n",
      "block7c_bn (BatchNormalization) (None, 15, 15, 3072) 12288       block7c_dwconv[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "block7c_activation (Activation) (None, 15, 15, 3072) 0           block7c_bn[0][0]                 \n",
      "__________________________________________________________________________________________________\n",
      "block7c_se_squeeze (GlobalAvera (None, 3072)         0           block7c_activation[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7c_se_reshape (Reshape)    (None, 1, 1, 3072)   0           block7c_se_squeeze[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7c_se_reduce (Conv2D)      (None, 1, 1, 128)    393344      block7c_se_reshape[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7c_se_expand (Conv2D)      (None, 1, 1, 3072)   396288      block7c_se_reduce[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7c_se_excite (Multiply)    (None, 15, 15, 3072) 0           block7c_activation[0][0]         \n",
      "                                                                 block7c_se_expand[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7c_project_conv (Conv2D)   (None, 15, 15, 512)  1572864     block7c_se_excite[0][0]          \n",
      "__________________________________________________________________________________________________\n",
      "block7c_project_bn (BatchNormal (None, 15, 15, 512)  2048        block7c_project_conv[0][0]       \n",
      "__________________________________________________________________________________________________\n",
      "block7c_drop (FixedDropout)     (None, 15, 15, 512)  0           block7c_project_bn[0][0]         \n",
      "__________________________________________________________________________________________________\n",
      "block7c_add (Add)               (None, 15, 15, 512)  0           block7c_drop[0][0]               \n",
      "                                                                 block7b_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "top_conv (Conv2D)               (None, 15, 15, 2048) 1048576     block7c_add[0][0]                \n",
      "__________________________________________________________________________________________________\n",
      "top_bn (BatchNormalization)     (None, 15, 15, 2048) 8192        top_conv[0][0]                   \n",
      "__________________________________________________________________________________________________\n",
      "top_activation (Activation)     (None, 15, 15, 2048) 0           top_bn[0][0]                     \n",
      "__________________________________________________________________________________________________\n",
      "avg_pool (GlobalAveragePooling2 (None, 2048)         0           top_activation[0][0]             \n",
      "__________________________________________________________________________________________________\n",
      "dense_1 (Dense)                 (None, 128)          262272      avg_pool[0][0]                   \n",
      "__________________________________________________________________________________________________\n",
      "batch_normalization_1 (BatchNor (None, 128)          512         dense_1[0][0]                    \n",
      "__________________________________________________________________________________________________\n",
      "dropout_1 (Dropout)             (None, 128)          0           batch_normalization_1[0][0]      \n",
      "__________________________________________________________________________________________________\n",
      "dense_2 (Dense)                 (None, 40)           5160        dropout_1[0][0]                  \n",
      "==================================================================================================\n",
      "Total params: 28,781,464\n",
      "Trainable params: 26,516,904\n",
      "Non-trainable params: 2,264,560\n",
      "__________________________________________________________________________________________________\n"
     ]
    }
   ],
   "source": [
    "x = base_model.output\n",
    "\n",
    "x = Dense(128)(x)\n",
    "x = BatchNormalization()(x)\n",
    "x=Dropout(0.5)(x)\n",
    "\n",
    "DENSE_KERNEL_INITIALIZER = {\n",
    "    'class_name': 'VarianceScaling',\n",
    "    'config': {\n",
    "        'scale': 1. / 3.,\n",
    "        'mode': 'fan_out',\n",
    "        'distribution': 'uniform'\n",
    "    }\n",
    "}\n",
    "predictions = Dense(n_classess, activation='softmax',kernel_initializer=DENSE_KERNEL_INITIALIZER)(x)\n",
    "model = Model(inputs=base_model.input, outputs=predictions)\n",
    "model.summary()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "if n_gpus > 1:\n",
    "    from keras.utils import multi_gpu_model\n",
    "    model = multi_gpu_model(model,gpus=n_gpus)\n",
    "\n",
    "with open(f'../tmp/model_{__file__}.json','w') as f:\n",
    "    model_json = model.to_json()\n",
    "    f.write(model_json)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "ckpt = ModelCheckpoint('../tmp/ckpt-'+__file__+'-Epoch_{epoch:03d}-acc_{acc:.5f}-val_acc_{val_acc:.5f}.h5', save_best_only=True, monitor='val_acc',verbose=1)\n",
    "\n",
    "estop = EarlyStopping(monitor='val_acc', min_delta=1e-7,verbose=1, patience=20)\n",
    "\n",
    "reduce_lr = ReduceLROnPlateau(monitor='val_loss', factor=0.5,patience=3, min_lr=1e-5,verbose=1)\n",
    "\n",
    "csv_logger = CSVLogger(f'../tmp/training_{__file__}.log',append=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Use tf.cast instead.\n",
      "Epoch 1/100\n",
      "248/248 [==============================] - 424s 2s/step - loss: 0.7895 - acc: 0.8291 - val_loss: 1.3766 - val_acc: 0.6535\n",
      "\n",
      "Epoch 00001: val_acc improved from -inf to 0.65353, saving model to ../tmp/ckpt-EfficientNet-B5-9.8.10-0123-Epoch_001-acc_0.82913-val_acc_0.65353.h5\n",
      "Epoch 2/100\n",
      "248/248 [==============================] - 328s 1s/step - loss: 0.3506 - acc: 0.9305 - val_loss: 1.1656 - val_acc: 0.6970\n",
      "\n",
      "Epoch 00002: val_acc improved from 0.65353 to 0.69701, saving model to ../tmp/ckpt-EfficientNet-B5-9.8.10-0123-Epoch_002-acc_0.93051-val_acc_0.69701.h5\n",
      "Epoch 3/100\n",
      "248/248 [==============================] - 334s 1s/step - loss: 0.2531 - acc: 0.9467 - val_loss: 0.8821 - val_acc: 0.7942\n",
      "\n",
      "Epoch 00003: val_acc improved from 0.69701 to 0.79416, saving model to ../tmp/ckpt-EfficientNet-B5-9.8.10-0123-Epoch_003-acc_0.94670-val_acc_0.79416.h5\n",
      "Epoch 4/100\n",
      "248/248 [==============================] - 328s 1s/step - loss: 0.1988 - acc: 0.9588 - val_loss: 1.0123 - val_acc: 0.7500\n",
      "\n",
      "Epoch 00004: val_acc did not improve from 0.79416\n",
      "Epoch 5/100\n",
      "248/248 [==============================] - 322s 1s/step - loss: 0.1959 - acc: 0.9589 - val_loss: 0.9573 - val_acc: 0.7480\n",
      "\n",
      "Epoch 00005: val_acc did not improve from 0.79416\n",
      "Epoch 6/100\n",
      "248/248 [==============================] - 334s 1s/step - loss: 0.1707 - acc: 0.9629 - val_loss: 0.6403 - val_acc: 0.8410\n",
      "\n",
      "Epoch 00006: val_acc improved from 0.79416 to 0.84103, saving model to ../tmp/ckpt-EfficientNet-B5-9.8.10-0123-Epoch_006-acc_0.96289-val_acc_0.84103.h5\n",
      "Epoch 7/100\n",
      "248/248 [==============================] - 331s 1s/step - loss: 0.1500 - acc: 0.9667 - val_loss: 0.7947 - val_acc: 0.8193\n",
      "\n",
      "Epoch 00007: val_acc did not improve from 0.84103\n",
      "Epoch 8/100\n",
      "248/248 [==============================] - 322s 1s/step - loss: 0.1233 - acc: 0.9725 - val_loss: 0.5972 - val_acc: 0.8295\n",
      "\n",
      "Epoch 00008: val_acc did not improve from 0.84103\n",
      "Epoch 9/100\n",
      "248/248 [==============================] - 333s 1s/step - loss: 0.1446 - acc: 0.9670 - val_loss: 0.5583 - val_acc: 0.8336\n",
      "\n",
      "Epoch 00009: val_acc did not improve from 0.84103\n",
      "Epoch 10/100\n",
      "248/248 [==============================] - 326s 1s/step - loss: 0.1272 - acc: 0.9713 - val_loss: 0.4185 - val_acc: 0.8777\n",
      "\n",
      "Epoch 00010: val_acc improved from 0.84103 to 0.87772, saving model to ../tmp/ckpt-EfficientNet-B5-9.8.10-0123-Epoch_010-acc_0.97127-val_acc_0.87772.h5\n",
      "Epoch 11/100\n",
      "248/248 [==============================] - 334s 1s/step - loss: 0.1205 - acc: 0.9744 - val_loss: 0.3318 - val_acc: 0.9035\n",
      "\n",
      "Epoch 00011: val_acc improved from 0.87772 to 0.90353, saving model to ../tmp/ckpt-EfficientNet-B5-9.8.10-0123-Epoch_011-acc_0.97442-val_acc_0.90353.h5\n",
      "Epoch 12/100\n",
      "248/248 [==============================] - 336s 1s/step - loss: 0.1021 - acc: 0.9769 - val_loss: 0.5063 - val_acc: 0.8499\n",
      "\n",
      "Epoch 00012: val_acc did not improve from 0.90353\n",
      "Epoch 13/100\n",
      "248/248 [==============================] - 330s 1s/step - loss: 0.1343 - acc: 0.9707 - val_loss: 0.7916 - val_acc: 0.8139\n",
      "\n",
      "Epoch 00013: val_acc did not improve from 0.90353\n",
      "Epoch 14/100\n",
      "248/248 [==============================] - 338s 1s/step - loss: 0.1106 - acc: 0.9748 - val_loss: 0.6274 - val_acc: 0.8614\n",
      "\n",
      "Epoch 00014: val_acc did not improve from 0.90353\n",
      "\n",
      "Epoch 00014: ReduceLROnPlateau reducing learning rate to 4.999999873689376e-05.\n",
      "Epoch 15/100\n",
      "248/248 [==============================] - 338s 1s/step - loss: 0.1494 - acc: 0.9664 - val_loss: 0.6290 - val_acc: 0.8471\n",
      "\n",
      "Epoch 00015: val_acc did not improve from 0.90353\n",
      "Epoch 16/100\n",
      "247/248 [============================>.] - ETA: 1s - loss: 0.1581 - acc: 0.9636"
     ]
    }
   ],
   "source": [
    "model.compile(optimizer=Adam(lr=1e-4), loss='categorical_crossentropy', metrics=['accuracy'])\n",
    "\n",
    "model.fit_generator(\n",
    "    train_g,\n",
    "    # steps_per_epoch=100,\n",
    "    steps_per_epoch=train_g.n // batch_size,\n",
    "    epochs=100,\n",
    "    class_weight=d_class_weights,\n",
    "    callbacks=[ckpt, estop,reduce_lr,csv_logger],\n",
    "    validation_data=valid_g,\n",
    "    # validation_steps=1,\n",
    "    validation_steps=valid_g.n // batch_size,\n",
    "    workers=32,\n",
    "    use_multiprocessing=True\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "!ls"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
